/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Alvaro
 */
@Embeddable
public class ScamvdInventarioPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ESTA")
    private BigInteger idEsta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_INVEN")
    private BigInteger idInven;

    public ScamvdInventarioPK() {
    }

    public ScamvdInventarioPK(BigInteger idEsta, BigInteger idInven) {
        this.idEsta = idEsta;
        this.idInven = idInven;
    }

    public BigInteger getIdEsta() {
        return idEsta;
    }

    public void setIdEsta(BigInteger idEsta) {
        this.idEsta = idEsta;
    }

    public BigInteger getIdInven() {
        return idInven;
    }

    public void setIdInven(BigInteger idInven) {
        this.idInven = idInven;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEsta != null ? idEsta.hashCode() : 0);
        hash += (idInven != null ? idInven.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScamvdInventarioPK)) {
            return false;
        }
        ScamvdInventarioPK other = (ScamvdInventarioPK) object;
        if ((this.idEsta == null && other.idEsta != null) || (this.idEsta != null && !this.idEsta.equals(other.idEsta))) {
            return false;
        }
        if ((this.idInven == null && other.idInven != null) || (this.idInven != null && !this.idInven.equals(other.idInven))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScamvdInventarioPK[ idEsta=" + idEsta + ", idInven=" + idInven + " ]";
    }
    
}
